﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ATEC.GeometryNET;
using SSDPNET.Geom;
using ATEC.ATDataCoreNET;

namespace EntityExample
{
    public class EntityUtlMethods
    {
        public static void EntityUtlExample()
        {
            //ATSceneRef scene = SSDPNET.ScenesFunctions.SceneRefGetActive();
            //List<ATEC.GeometryNET.CurveSet> profiles = new List<CurveSet>();
            //for (int i = 0; i < 3; ++i)
            //{
            //    ATEC.GeometryNET.XPoint3d pt1 = ATEC.GeometryNET.XPoint3d.FromXYZ(0 + i * 5, 10, 10);
            //    ATEC.GeometryNET.XPoint3d pt2 = ATEC.GeometryNET.XPoint3d.FromXYZ(0 + i * 5, 10, -10);
            //    ATEC.GeometryNET.XPoint3d pt3 = ATEC.GeometryNET.XPoint3d.FromXYZ(0 + i * 5, -10, -10);
            //    ATEC.GeometryNET.XPoint3d pt4 = ATEC.GeometryNET.XPoint3d.FromXYZ(0 + i * 5, -10, 10);
            //    List<ATEC.GeometryNET.XPoint3d> pts = new List<ATEC.GeometryNET.XPoint3d> { pt1, pt2, pt3, pt4, pt1 };
            //    CurveSet tempCurveSet = CurveSet.CreateLinear(pts, CurveSet.BoundaryType.Outer, true);
            //    ATEC.ATDataCoreNET.ATObjects.ATObject element = ATEC.ATDataCoreNET.ATObjects.GeometryToATObject.ToObject(scene.GetATScene(), tempCurveSet, null);
            //    element.AddToScene();
            //    profiles.Add(tempCurveSet);
            //}

            //SolidCoreEntity solid = null;
            //ATECStatus status = SSDPNET.DataCore.EntityUtl.Create.EntityFromLoft(out solid, profiles, null, scene, false, false);
            //ATEC.ATDataCoreNET.ATObjects.ATObject ele = SSDPNET.DataCore.DraftingObjectSchemaExtension.ToObject(scene.GetATScene(), solid, null);
            //ele.AddToScene();

            return;
        }
    }
}
